﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using XiaoYuStock.Core;
using XiaoYuStock.Core.Entities;
using System.Data.Entity.Validation;
using XiaoYuStock.Core.Mails;
using System.Threading;
using System.IO;
using Topshelf;

namespace XiaoYuStock.Hosts
{
    class Program
    {
        static void Main(string[] args)
        {

            log4net.Config.XmlConfigurator.ConfigureAndWatch(new FileInfo(AppDomain.CurrentDomain.BaseDirectory + "log4net.config"));

            HostFactory.Run(x =>
            {
                x.UseLog4Net();

                x.Service<ServiceRunner>();

              //  x.SetDescription("XiaoYuStock.Hosts定时任务");
              //  x.SetDisplayName("XiaoYuStock.Hosts");
              //  x.SetServiceName("XiaoYuStock.Hosts任务");

               // x.RunAsLocalSystem();
            });

          
        }
    }
}
